class Auth{
    static async check(ctx,next) {
        let {authorization} = ctx.header
        if(ctx.jwt.check(authorization)){
            await next()
        }else{
            ctx.body={
                code:5000,
                codeInfo:"token已经过期"
            }
        }
    }
}
module.exports=Auth